<?php anstract class Template {
	protected $Type = '';               // Children should define this
	protected $Author = '';             // Children should define this
	protected $Timeformat = '';         // Children should define this



	protected $_Feed = 'Feed';
	protected $_Entry = 'Entry';
	protected $_Single = 'Single';
	protected $_Dir = '';



	public function __construct ($Template) {
		$Infofile = PREFIX."Engine/Templates/$Template/info.ini";
		if (! file_exists ($Infofile)) throw new ErrorException ("Template info file $Infofile doesn't seem to exist");
		foreach (parse_ini_file ($Infofile) as $Field => $Value) if (property_exists (get_class ($this), $Field = "_$Field")) $this->$Field = $Value;
		$this->_Dir = dirname ($Infofile).'/';
		header ('Content-Type: '.$this->_Type);
	}



	public function Feed (Collection $Entries) {require ($this->_Dir.$this->_Feed);}
	public function Entry (Element $Entry) {require ($this->_Dir.$this->_Entry);}
	public function Single (Element $Entry) {require ($this->_Dir.$this->_Single);}










	protected function Filter ($Text) {return ($Text);}
} ?>